Repository navigation
fix(run): detect the host from the locked records when installing - #7476
Merged
Hofer-Julian merged 3 commits intoNov 10, 2026
Merged
Conversation
Since prefix-dev#7462, `pixi run` detects only the host of the environment it installs, but that detection still covers the environment's whole solve group. Detection queries repodata recursively for the group's dependencies, so an environment sharing a solve group with a larger one still peaked at about 200 MiB, against about 40 MiB in 0.82.0. An install from the lock file doesn't need solve candidates, so it now detects only the virtual packages its locked records require, plus those its platforms declare. Rather than the group's dependencies, that reads only the detector registrations of the group's channels, bringing the solve-group case down to about 54 MiB. A channel without sharded repodata publishes those in its full `repodata.json`, which is then still downloaded. A detection for a solve still sees every candidate's names, so each environment keeps it apart from the locked one and prefers it once detected. A solve later in the same process then isn't handed the narrower result. The locked detection is kept until the manifest changes, so a workspace held across a change to `pixi.lock` alone, as a long-lived `pixi_api` consumer might, can miss a name the new lock requires. The remaining gap to 0.82.0 is loading the channels' shard index to read their registrations, which seems necessary to use custom detectors. Fixes prefix-dev#7458
lucascolley
force-pushed
the
fix/locked-install-host-scope
branch
from
November 5, 2026 09:53
e55b49e to
0137f5c
Compare
lucascolley
commented
Nov 5, 2026
Reuse detections by host scope and replace the locked snapshot when the scope changes. Keep full-solve detection preferred. Verify lock replacement and reversion in one workspace, cache reuse, and solve-after-install behavior. Release tests and smoke checks pass; the memory improvement is preserved.
Hofer-Julian
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ref. #7458 @lorhi
Ping the maintainers you discussed this contribution with here: @Hofer-Julian
Summary: trying to again reduce unnecessary computation for host platform detection, this time specifically when installing an environment (that may be large, or part of a large solve group).
LLM description:
Since #7462,
pixi rundetects only the host of the environment itinstalls, but that detection still covers the environment's whole solve
group. Detection queries repodata recursively for the group's
dependencies, so an environment sharing a solve group with a larger one
still peaked at about 200 MiB, against about 40 MiB in 0.82.0.
An install from the lock file doesn't need solve candidates, so it now
detects only the virtual packages its locked records require, plus those
its platforms declare. Rather than the group's dependencies, that reads
only the detector registrations of the group's channels, bringing the
solve-group case down to about 54 MiB. A channel without sharded
repodata publishes those in its full
repodata.json, which is thenstill downloaded.
A detection for a solve still sees every candidate's names, so each
environment keeps it apart from the locked one and prefers it once
detected. A solve later in the same process then isn't handed the
narrower result.
The locked detection is kept until the manifest changes, so a workspace
held across a change to
pixi.lockalone, as a long-livedpixi_apiconsumer might, can miss a name the new lock requires.
The remaining gap to 0.82.0 is loading the channels' shard index to read
their registrations, which seems necessary to use custom detectors.
Checklist: